<?php

namespace app\common\command;

use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;


class Hello extends Command {
	protected function configure(){
		$this->setName('hello')
			  ->addArgument('name', Argument::OPTIONAL, 'you name')
			  ->setDescription('sayHello');
	}
	protected function execute(Input $input, Output $output) {
		$name = trim($input->getArgument('name'));
		$name = $name ?: 'test_hello';
		$output->writeln('Hello '.$name);
	}
}